package com.xixi.example.consumer;

import com.xixi.core.rpc.bootstrap.ConsumerBootstrap;
import com.xixi.core.rpc.config.RpcConfig;
import com.xixi.core.rpc.proxy.ServiceProxyFactory;
import com.xixi.core.rpc.utils.ConfigUtils;
import com.xixi.example.common.model.User;
import com.xixi.example.common.service.UserService;

/**
 * @author: zxh
 * @date: 2024/8/21 17:15
 * @description: 消费者示例
 */
public class ConsumerExample {

	public static void main(String[] args) {
		// 服务提供者初始化
		ConsumerBootstrap.init();

		// 获取代理
		UserService service = ServiceProxyFactory.getProxy(UserService.class);
		User newUser = service.getUser(null);
		System.out.println("result1: " + newUser);
		boolean isLogin = service.isLogin();
		System.out.println("result2: " + isLogin);
	}
}
